package com.oazon.moco.link.serialport;

import java.util.Arrays;

import com.oazon.moco.link.core.LinkEvent;
import com.oazon.moco.link.core.LinkEventListener;
import com.oazon.moco.link.core.source.LinkEventSource;
import com.oazon.moco.link.event.SpechEvent;



public class SpechEventListener extends LinkEventListener {

	public SpechEventListener(LinkEventSource... sources) {
		setBlackList(Arrays.asList(sources));	
	}

	@Override
	public void onLinkEvent(LinkEvent event) {
		if(filter((LinkEventSource)event.getSource()) || !(event instanceof SpechEvent)){
			return;
		}
		SpechEvent e = (SpechEvent)event;
	
		System.out.println("speech state is"+e.getSpechStatus());
	}	
}
